package org.finesys.common.core.util;

import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.lang.NonNull;

public class SpringUtil extends cn.hutool.extra.spring.SpringUtil implements EnvironmentAware {

    private static Environment environment;

    @Override
    public void setEnvironment(@NonNull Environment environment) {
        SpringUtil.environment = environment;
    }

    public static String getProperty(String key) {
        return SpringUtil.environment.getProperty(key);
    }
}
